#include "../../Header/Device/Log.h"


#if CURRENT_PLATFORM == PLATFORM_WIN32
	void __cdecl w32Log(const char *formatStr, ...)
	{
		va_list params;
		char buf[2048];

		va_start(params, formatStr);
		vsprintf(buf, formatStr, params);

		printf("%s", buf);

		//Convert form char to wchar_t
		const _utInt32 char_size = strlen(buf);
		wchar_t* out = new wchar_t[char_size+1];
		mbstowcs(out, buf, char_size);
		out[char_size] = '0';

		OutputDebugString(buf);

		delete[] out;
		out = NULL;

		va_end(params);
	}

	void __cdecl w32Log(...)
	{
		//va_list params;
		//char buf[2048];

		//va_start(params, formatStr);
		//vsprintf(buf, formatStr, params);

		//printf("%s", buf);

		////Convert form char to wchar_t
		//const _utInt32 char_size = strlen(buf);
		//wchar_t* out = new wchar_t[char_size + 1];
		//mbstowcs(out, buf, char_size);
		//out[char_size] = '0';

		//OutputDebugString(out);

		//delete[] out;
		//out = NULL;

		//va_end(params);
	}
#else //Android
#endif